\(\int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx\) [477]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 96 \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}+\frac {2 \cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^4(e+f x)}{5 f \sqrt {a \cos ^2(e+f x)}} \]

[Out]

-cot(f*x+e)/f/(a*cos(f*x+e)^2)^(1/2)+2/3*cot(f*x+e)*csc(f*x+e)^2/f/(a*cos(f*x+e)^2)^(1/2)-1/5*cot(f*x+e)*csc(f
*x+e)^4/f/(a*cos(f*x+e)^2)^(1/2)

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3255, 3286, 2686, 200} \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^4(e+f x)}{5 f \sqrt {a \cos ^2(e+f x)}}+\frac {2 \cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}} \]

[In]

Int[Cot[e + f*x]^6/Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

-(Cot[e + f*x]/(f*Sqrt[a*Cos[e + f*x]^2])) + (2*Cot[e + f*x]*Csc[e + f*x]^2)/(3*f*Sqrt[a*Cos[e + f*x]^2]) - (C
ot[e + f*x]*Csc[e + f*x]^4)/(5*f*Sqrt[a*Cos[e + f*x]^2])

Rule 200

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps \begin{align*} \text {integral}& = \int \frac {\cot ^6(e+f x)}{\sqrt {a \cos ^2(e+f x)}} \, dx \\ & = \frac {\cos (e+f x) \int \cot ^5(e+f x) \csc (e+f x) \, dx}{\sqrt {a \cos ^2(e+f x)}} \\ & = -\frac {\cos (e+f x) \text {Subst}\left (\int \left (-1+x^2\right )^2 \, dx,x,\csc (e+f x)\right )}{f \sqrt {a \cos ^2(e+f x)}} \\ & = -\frac {\cos (e+f x) \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\csc (e+f x)\right )}{f \sqrt {a \cos ^2(e+f x)}} \\ & = -\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}+\frac {2 \cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^4(e+f x)}{5 f \sqrt {a \cos ^2(e+f x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.51 \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {\cot (e+f x) \left (15-10 \csc ^2(e+f x)+3 \csc ^4(e+f x)\right )}{15 f \sqrt {a \cos ^2(e+f x)}} \]

[In]

Integrate[Cot[e + f*x]^6/Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

-1/15*(Cot[e + f*x]*(15 - 10*Csc[e + f*x]^2 + 3*Csc[e + f*x]^4))/(f*Sqrt[a*Cos[e + f*x]^2])

Maple [A] (verified)

Time = 0.67 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.77

method result size
default \(-\frac {\cos \left (f x +e \right ) \left (15 \left (\cos ^{4}\left (f x +e \right )\right )-20 \left (\cos ^{2}\left (f x +e \right )\right )+8\right )}{15 \left (\cos \left (f x +e \right )-1\right )^{2} \left (1+\cos \left (f x +e \right )\right )^{2} \sin \left (f x +e \right ) \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) \(74\)
risch \(-\frac {2 i \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left (15 \,{\mathrm e}^{8 i \left (f x +e \right )}-20 \,{\mathrm e}^{6 i \left (f x +e \right )}+58 \,{\mathrm e}^{4 i \left (f x +e \right )}-20 \,{\mathrm e}^{2 i \left (f x +e \right )}+15\right )}{15 \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{5}}\) \(103\)

[In]

int(cot(f*x+e)^6/(a-a*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/15*cos(f*x+e)*(15*cos(f*x+e)^4-20*cos(f*x+e)^2+8)/(cos(f*x+e)-1)^2/(1+cos(f*x+e))^2/sin(f*x+e)/(a*cos(f*x+e
)^2)^(1/2)/f

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.82 \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {{\left (15 \, \cos \left (f x + e\right )^{4} - 20 \, \cos \left (f x + e\right )^{2} + 8\right )} \sqrt {a \cos \left (f x + e\right )^{2}}}{15 \, {\left (a f \cos \left (f x + e\right )^{5} - 2 \, a f \cos \left (f x + e\right )^{3} + a f \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )} \]

[In]

integrate(cot(f*x+e)^6/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/15*(15*cos(f*x + e)^4 - 20*cos(f*x + e)^2 + 8)*sqrt(a*cos(f*x + e)^2)/((a*f*cos(f*x + e)^5 - 2*a*f*cos(f*x
+ e)^3 + a*f*cos(f*x + e))*sin(f*x + e))

Sympy [F]

\[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\int \frac {\cot ^{6}{\left (e + f x \right )}}{\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \]

[In]

integrate(cot(f*x+e)**6/(a-a*sin(f*x+e)**2)**(1/2),x)

[Out]

Integral(cot(e + f*x)**6/sqrt(-a*(sin(e + f*x) - 1)*(sin(e + f*x) + 1)), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1236 vs. \(2 (86) = 172\).

Time = 0.38 (sec) , antiderivative size = 1236, normalized size of antiderivative = 12.88 \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\text {Too large to display} \]

[In]

integrate(cot(f*x+e)^6/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

2/15*((15*sin(9*f*x + 9*e) - 20*sin(7*f*x + 7*e) + 58*sin(5*f*x + 5*e) - 20*sin(3*f*x + 3*e) + 15*sin(f*x + e)
)*cos(10*f*x + 10*e) + 75*(sin(8*f*x + 8*e) - 2*sin(6*f*x + 6*e) + 2*sin(4*f*x + 4*e) - sin(2*f*x + 2*e))*cos(
9*f*x + 9*e) + 5*(20*sin(7*f*x + 7*e) - 58*sin(5*f*x + 5*e) + 20*sin(3*f*x + 3*e) - 15*sin(f*x + e))*cos(8*f*x
 + 8*e) + 100*(2*sin(6*f*x + 6*e) - 2*sin(4*f*x + 4*e) + sin(2*f*x + 2*e))*cos(7*f*x + 7*e) + 10*(58*sin(5*f*x
 + 5*e) - 20*sin(3*f*x + 3*e) + 15*sin(f*x + e))*cos(6*f*x + 6*e) + 290*(2*sin(4*f*x + 4*e) - sin(2*f*x + 2*e)
)*cos(5*f*x + 5*e) + 50*(4*sin(3*f*x + 3*e) - 3*sin(f*x + e))*cos(4*f*x + 4*e) - (15*cos(9*f*x + 9*e) - 20*cos
(7*f*x + 7*e) + 58*cos(5*f*x + 5*e) - 20*cos(3*f*x + 3*e) + 15*cos(f*x + e))*sin(10*f*x + 10*e) - 15*(5*cos(8*
f*x + 8*e) - 10*cos(6*f*x + 6*e) + 10*cos(4*f*x + 4*e) - 5*cos(2*f*x + 2*e) + 1)*sin(9*f*x + 9*e) - 5*(20*cos(
7*f*x + 7*e) - 58*cos(5*f*x + 5*e) + 20*cos(3*f*x + 3*e) - 15*cos(f*x + e))*sin(8*f*x + 8*e) - 20*(10*cos(6*f*
x + 6*e) - 10*cos(4*f*x + 4*e) + 5*cos(2*f*x + 2*e) - 1)*sin(7*f*x + 7*e) - 10*(58*cos(5*f*x + 5*e) - 20*cos(3
*f*x + 3*e) + 15*cos(f*x + e))*sin(6*f*x + 6*e) - 58*(10*cos(4*f*x + 4*e) - 5*cos(2*f*x + 2*e) + 1)*sin(5*f*x
+ 5*e) - 50*(4*cos(3*f*x + 3*e) - 3*cos(f*x + e))*sin(4*f*x + 4*e) - 20*(5*cos(2*f*x + 2*e) - 1)*sin(3*f*x + 3
*e) + 100*cos(3*f*x + 3*e)*sin(2*f*x + 2*e) - 75*cos(f*x + e)*sin(2*f*x + 2*e) + 75*cos(2*f*x + 2*e)*sin(f*x +
 e) - 15*sin(f*x + e))*sqrt(a)/((a*cos(10*f*x + 10*e)^2 + 25*a*cos(8*f*x + 8*e)^2 + 100*a*cos(6*f*x + 6*e)^2 +
 100*a*cos(4*f*x + 4*e)^2 + 25*a*cos(2*f*x + 2*e)^2 + a*sin(10*f*x + 10*e)^2 + 25*a*sin(8*f*x + 8*e)^2 + 100*a
*sin(6*f*x + 6*e)^2 + 100*a*sin(4*f*x + 4*e)^2 - 100*a*sin(4*f*x + 4*e)*sin(2*f*x + 2*e) + 25*a*sin(2*f*x + 2*
e)^2 - 2*(5*a*cos(8*f*x + 8*e) - 10*a*cos(6*f*x + 6*e) + 10*a*cos(4*f*x + 4*e) - 5*a*cos(2*f*x + 2*e) + a)*cos
(10*f*x + 10*e) - 10*(10*a*cos(6*f*x + 6*e) - 10*a*cos(4*f*x + 4*e) + 5*a*cos(2*f*x + 2*e) - a)*cos(8*f*x + 8*
e) - 20*(10*a*cos(4*f*x + 4*e) - 5*a*cos(2*f*x + 2*e) + a)*cos(6*f*x + 6*e) - 20*(5*a*cos(2*f*x + 2*e) - a)*co
s(4*f*x + 4*e) - 10*a*cos(2*f*x + 2*e) - 10*(a*sin(8*f*x + 8*e) - 2*a*sin(6*f*x + 6*e) + 2*a*sin(4*f*x + 4*e)
- a*sin(2*f*x + 2*e))*sin(10*f*x + 10*e) - 50*(2*a*sin(6*f*x + 6*e) - 2*a*sin(4*f*x + 4*e) + a*sin(2*f*x + 2*e
))*sin(8*f*x + 8*e) - 100*(2*a*sin(4*f*x + 4*e) - a*sin(2*f*x + 2*e))*sin(6*f*x + 6*e) + a)*f)

Giac [F(-2)]

Exception generated. \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(cot(f*x+e)^6/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:index.cc index_m operator + Error: Bad Argument Value

Mupad [B] (verification not implemented)

Time = 20.96 (sec) , antiderivative size = 491, normalized size of antiderivative = 5.11 \[ \int \frac {\cot ^6(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx=-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,4{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,32{}\mathrm {i}}{3\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^2\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,352{}\mathrm {i}}{15\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^3\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,128{}\mathrm {i}}{5\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^4\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )}-\frac {{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,64{}\mathrm {i}}{5\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^5\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+{\mathrm {e}}^{e\,3{}\mathrm {i}+f\,x\,3{}\mathrm {i}}\right )} \]

[In]

int(cot(e + f*x)^6/(a - a*sin(e + f*x)^2)^(1/2),x)

[Out]

- (exp(e*3i + f*x*3i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2)*4i)/(a*f*(exp(
e*2i + f*x*2i) - 1)*(exp(e*1i + f*x*1i) + exp(e*3i + f*x*3i))) - (exp(e*3i + f*x*3i)*(a - a*((exp(- e*1i - f*x
*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2)*32i)/(3*a*f*(exp(e*2i + f*x*2i) - 1)^2*(exp(e*1i + f*x*1i) +
exp(e*3i + f*x*3i))) - (exp(e*3i + f*x*3i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)
^(1/2)*352i)/(15*a*f*(exp(e*2i + f*x*2i) - 1)^3*(exp(e*1i + f*x*1i) + exp(e*3i + f*x*3i))) - (exp(e*3i + f*x*3
i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2)*128i)/(5*a*f*(exp(e*2i + f*x*2i)
- 1)^4*(exp(e*1i + f*x*1i) + exp(e*3i + f*x*3i))) - (exp(e*3i + f*x*3i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 -
(exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2)*64i)/(5*a*f*(exp(e*2i + f*x*2i) - 1)^5*(exp(e*1i + f*x*1i) + exp(e*3i + f*
x*3i)))